Ext.define('HIT.view.SetVatSpecialtyInvoicePanel', {//增值税专业发票
    extend: 'Ext.form.Panel',
    alias:'widget.setvattypegrid',

    height: 821,
    width: 552,
    autoScroll: true,
    layout: {
        type: 'absolute'
    },
    bodyPadding: 10,
    collapsible: false,
    overlapHeader: false,
    title: '',

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
                    {
                    	xtype: 'form',
                        x: 60,
                        y: 10,
                        height: 1010,
                        width: 629,
                        id: 'vat-specialty-all-info',
                        layout: {
                            type: 'absolute'
                        },
                        title: '',
                        items: [
                                {
                    xtype: 'fieldset',
                    x: 10,
                    y: 0,
                    height: 430,
                    width: 585,
                    id: 'vat-specialty-base-info',
                    layout: {
                        type: 'absolute'
                    },
                    title: Share.T('基本信息设置'),
                    items: [
                        {
                        	xtype: 'numberfield',
                            hideTrigger : true,
                            maxValue : 9999999999999,
                            minValue : 0.01,
                            allowNegative : false,
                            decimalPrecision : 2,
                            width: 233,
                            x: 0,
                            y: 0,
                            id: 'vat-specialty-base-maxmoney',
                            fieldLabel: Share.T('最大金额'),
                            allowBlank: false,
                            blankText: Share.T('最大金额不能为空'),
                            emptyText: Share.T('请输入最大金额'),
        	                msgTarget  : 'side'
                        },
                        {
                            xtype: 'numberfield',
                            hideTrigger : true,
                            maxValue : 10000,
                            minValue : 1,
                            allowNegative : false,
                            decimalPrecision : 0,
                            x: 300,
                            y: 0,
                            width: 233,
                            id: 'vat-specialty-base-maxline',
                            fieldLabel: Share.T('最大行数'),
                            allowBlank: false,
                            blankText: Share.T('最大行数不能为空'),
                            emptyText: Share.T('请输入最大行数'),
        	                msgTarget  : 'side'
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 80,
                            id: 'vat-specialty-base-interface',
                            layout: {
                            	type: 'absolute'
                            },
                            width: 400,
                            fieldLabel: Share.T('接口方式'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    boxLabel: 'AI',
                                    x: 3,
                                    y: 0,
                                    inputValue: 'AI',
                                    name: 'vat-specialty-base-interface-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    boxLabel: 'TXT',
                                    x: 156,
                                    y: 0,
                                    inputValue: 'TXT',
                                    name: 'vat-specialty-base-interface-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    fieldLabel: '',
                                    boxLabel: 'EXCEL',
                                    x: 309,
                                    y: 0,
                                    inputValue: 'EXCEL',
                                    name: 'vat-specialty-base-interface-radio'
                                }
                            ]
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 160,
                            id: 'vat-specialty-base-erp',
                            layout: {
                            	type: 'absolute'
                            },
                            width: 400,
                            fieldLabel: Share.T('回写ERP方式'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    boxLabel: 'TXT',
                                    x: 3,
                                    y: 0,
                                    inputValue: 'TXT',
                                    name: 'vat-specialty-base-writeback-erp-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    boxLabel: 'EXCEL',
                                    x: 105,
                                    y: 0,
                                    inputValue: 'EXCEL',
                                    name: 'vat-specialty-base-writeback-erp-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    boxLabel: 'CSV',
                                    x: 205,
                                    y: 0,
                                    inputValue: 'CSV',
                                    name: 'vat-specialty-base-writeback-erp-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    fieldLabel: '',
                                    boxLabel: Share.T('数据源'),
                                    x: 309,
                                    y: 0,
                                    inputValue: Share.T('数据源'),
                                    name: 'vat-specialty-base-writeback-erp-radio'
                                }
                            ]
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 120,
                            id: 'vat-specialty-base-dataimport-radio',
                            layout: {
                            	type: 'absolute'
                            },
                            width: 400,
                            fieldLabel: Share.T('数据导入方式'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    boxLabel: 'TXT',
                                    x: 3,
                                    y: 0,
                                    inputValue: 'TXT',
                                    name: 'vat-specialty-base-import-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    boxLabel: 'EXCEL',
                                    x: 156,
                                    y: 0,
                                    inputValue: 'EXCEL',
                                    name: 'vat-specialty-base-import-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    fieldLabel: '',
                                    boxLabel: Share.T('数据源'),
                                    x: 309,
                                    y: 0,
                                    inputValue: Share.T('数据源'),
                                    name: 'vat-specialty-base-import-radio'
                                }
                            ]
                        },
                        {
                            xtype: 'checkboxfield',
                            x: 0,
                            y: 200,
                            id: 'vat-specialty-base-is-outcode',
                            fieldLabel: Share.T('是否生成Outcode'),
                            labelWidth: 170,
                            boxLabel: ''
                        },
                        {
                            xtype: 'checkboxfield',
                            x: 261,
                            y: 200,
                            id: 'vat-specialty-base-is-pinaccount',
                            fieldLabel: Share.T('是否显示销方信息'),
                            labelWidth: 170,
                            boxLabel: ''
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 240,
                            id: 'vat-specialty-base-importoverrideappend',
                            layout: {
                            	type: 'absolute'
                            },
                            width: 400,
                            fieldLabel: Share.T('导入覆盖方式'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    boxLabel: Share.T('覆盖'),
                                    x  : 3,
                                    y  : 0,
                                    inputValue: '0',
                                    name: 'vat-specialty-base-importoverrideappend-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    boxLabel: Share.T('拒绝'),
                                    x  : 156,
                                    y  : 0,
                                    inputValue: '1',
                                    name: 'vat-specialty-base-importoverrideappend-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    fieldLabel: '',
                                    boxLabel: Share.T('追加'),
                                    x  : 309,
                                    y  : 0,
                                    inputValue: Share.T('2'),
                                    name: 'vat-specialty-base-importoverrideappend-radio'
                                }
                            ]
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 280,
                            id: 'vat-specialty-base-clientmaindata',
                            layout: {
                            	type: 'absolute'
                            },
                            width: 400,
                            fieldLabel: Share.T('客户主数据'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    boxLabel: Share.T('禁用关联方式'),
                                    x  : 3,
                                    y  : 0,
                                    inputValue: '0',
                                    name: 'vat-specialty-base-clientmaindata-connect'
                                },
                                {
                                    xtype: 'radiofield',
                                    boxLabel: Share.T('客户名称关联'),
                                    x  : 156,
                                    y  : 0,
                                    inputValue: '1',
                                    name: 'vat-specialty-base-clientmaindata-connect'
                                },
                                {
                                    xtype: 'radiofield',
                                    fieldLabel: '',
                                    boxLabel: Share.T('客户代码关联'),
                                    x  : 309,
                                    y  : 0,
                                    inputValue: Share.T('2'),
                                    name: 'vat-specialty-base-clientmaindata-connect'
                                }
                            ]
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 320,
                            id: 'vat-specialty-base-goodsmaindata',
                            layout: {
                            	type: 'absolute'
                            },
                            width: 400,
                            fieldLabel: Share.T('商品主数据'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    boxLabel: Share.T('禁用关联方式'),
                                    x  : 3,
                                    y  : 0,
                                    inputValue: '0',
                                    name: 'vat-specialty-base-goodsmaindata-connect'
                                },
                                {
                                    xtype: 'radiofield',
                                    boxLabel: Share.T('商品名称关联'),
                                    x  : 156,
                                    y  : 0,
                                    inputValue: '1',
                                    name: 'vat-specialty-base-goodsmaindata-connect'
                                },
                                {
                                    xtype: 'radiofield',
                                    fieldLabel: '',
                                    boxLabel: Share.T('商品代码关联'),
                                    x  : 309,
                                    y  : 0,
                                    inputValue: Share.T('2'),
                                    name: 'vat-specialty-base-goodsmaindata-connect'
                                }
                            ]
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 360,
                            id: 'vat-specialty-base-splitfunc',
                            layout: {
                            	type: 'absolute'
                            },
                            width: 400,
                            fieldLabel: Share.T('拆分超额方式'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    boxLabel: Share.T('按照数量拆分'),
                                    x  : 3,
                                    y  : 0,
                                    inputValue: '0',
                                    name: 'vat-specialty-base-splitfunc-priceorcount'
                                },
                                {
                                    xtype: 'radiofield',
                                    boxLabel: Share.T('按照单价拆分'),
                                    x  : 156,
                                    y  : 0,
                                    inputValue: '1',
                                    name: 'vat-specialty-base-splitfunc-priceorcount'
                                }
                            ]
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 40,
                            id: 'vat-specialty-base-writeback',
                            width: 400,
                            layout: {
                                type: 'absolute'
                            },
                            fieldLabel: Share.T('回写方式'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 3,
                                    y: 0,
                                    boxLabel: 'TXT',
                                    inputValue: 'TXT',
                                    name: 'vat-specialty-base-writeback-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 156,
                                    y: 0,
                                    boxLabel: 'EXCEL',
                                    inputValue: 'EXCEL',
                                    name: 'vat-specialty-base-writeback-radio'
                                }
                            ]
                        }
                    ]
                },
                {
                    xtype: 'fieldset',
                    x: 10,
                    y: 440,
                    height: 230,
                    id: 'vat-specialty-cal-info',
                    width: 585,
                    layout: {
                        type: 'absolute'
                    },
                    title: Share.T('计算方式设置'),
                    items: [
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 0,
                            id: 'vat-specialty-cal-price',
                            width: 610,
                            layout: {
                                type: 'absolute'
                            },
                            fieldLabel: Share.T('价格方式'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 3,
                                    y: 0,
                                    boxLabel: Share.T('不含税'),
                                    inputValue: '0',
                                    name: 'vat-specialty-cal-price-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 156,
                                    y: 0,
                                    boxLabel: Share.T('含税'),
                                    inputValue: '1',
                                    name: 'vat-specialty-cal-price-radio'
                                }
                            ]
                        },
                        {
                            xtype: 'radiogroup',
                            x: 0,
                            y: 40,
                            id: 'vat-specialty-cal-import',
                            width: 610,
                            layout: {
                                type: 'absolute'
                            },
                            fieldLabel: Share.T('导入计算规则'),
                            items: [
                                {
                                    xtype: 'radiofield',
                                    x: 309,
                                    y: 0,
                                    boxLabel: Share.T('金额')+'/'+Share.T('单价')+'='+Share.T('数量'),
                                    inputValue: '3',
                                    name: 'vat-specialty-cal-import-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 3,
                                    y: 0,
                                    boxLabel: Share.T('数量')+'*'+Share.T('单价')+'='+Share.T('金额'),
                                    inputValue: '1',
                                    name: 'vat-specialty-cal-import-radio'
                                },
                                {
                                    xtype: 'radiofield',
                                    x: 156,
                                    y: 0,
                                    fieldLabel: '',
                                    boxLabel: Share.T('金额')+'/'+Share.T('数量')+'='+Share.T('单价'),
                                    inputValue: '2',
                                    name: 'vat-specialty-cal-import-radio'
                                }
                            ]
                        },
                        {
                        	xtype: 'numberfield',
                            hideTrigger : true,
                            maxValue : 99999999999,
                            minValue : 0.000001,
                            decimalPrecision : 6,
                            x: 0,
                            y: 80,
                            width: 233,
                            labelWidth: 130,
                            id: 'vat-specialty-cal-unitprice',
                            fieldLabel: Share.T('单价计算精度'),
                            allowBlank: false,
                            blankText: Share.T('单价计算精度不能为空'),
                            emptyText: Share.T('请输入单价计算精度'),
        	                msgTarget  : 'side'
                        },
                        {
                        	xtype: 'numberfield',
                            hideTrigger : true,
                            maxValue : 99999999999,
                            minValue : 0.000001,
                            allowNegative : false,
                            decimalPrecision : 6,
                            x: 300,
                            y: 80,
                            width: 243,
                            labelWidth: 140,
                            id: 'vat-specialty-cal-num',
                            fieldLabel: Share.T('数量计算精度'),
                            allowBlank: false,
                            blankText: Share.T('数量计算精度不能为空'),
                            emptyText: Share.T('请输入数量计算精度'),
        	                msgTarget  : 'side'
                        },
                        {
                        	xtype: 'numberfield',
                            hideTrigger : true,
                            maxValue : 99999999999,
                            minValue : 0.000001,
                            allowNegative : false,
                            decimalPrecision : 6,
                            x: 0,
                            y: 120,
                            width: 233,
                            labelWidth: 130,
                            id: 'vat-specialty-cal-split',
                            fieldLabel: Share.T('拆分试算精度'),
                            allowBlank: false,
                            blankText: Share.T('拆分计算精度不能为空'),
                            emptyText: Share.T('请输入拆分计算精度'),
        	                msgTarget  : 'side'
                        },
                        {
                        	xtype: 'numberfield',
                            hideTrigger : true,
                            maxValue : 9999999999999,
                            minValue : 0.01,
                            allowNegative : false,
                            decimalPrecision : 2,
                            x: 300,
                            y: 120,
                            width: 243,
                            labelWidth: 140,
                            id: 'vat-specialty-step-split',
                            fieldLabel: Share.T('拆分试算步长'),
                            allowBlank: false,
                            blankText: Share.T('拆分试算步长不能为空'),
                            emptyText: Share.T('请输入拆分试算步长'),
        	                msgTarget  : 'side'
                        },
                        {
                        	xtype: 'numberfield',
                            hideTrigger : true,
                            maxValue : 10000,
                            minValue : 1,
                            allowNegative : false,
                            decimalPrecision : 0,
                            x: 300,
                            y: 160,
                            width: 243,
                            labelWidth: 140,
                            id: 'vat-specialty-cal-maxline',
                            fieldLabel: Share.T('拆分结果限行'),
                            allowBlank: false,
                            blankText: Share.T('拆分结果限行不能为空'),
                            emptyText: Share.T('请输入拆分结果限行'),
        	                msgTarget  : 'side'
                        },
                        {
                        	xtype: 'numberfield',
                            hideTrigger : true,
                            maxValue : 9999999999999,
                            minValue : 0.01,
                            allowNegative : false,
                            decimalPrecision : 2,
                            x: 0,
                            y: 160,
                            width: 233,
                            labelWidth: 130,
                            id: 'vat-specialty-cal-minmoney',
                            fieldLabel: Share.T('最小金额'),
                            allowBlank: false,
                            blankText: Share.T('最小金额不能为空'),
                            emptyText: Share.T('请输入最小金额'),
        	                msgTarget  : 'side'
                        }
                    ]
                },			          
                {//红废票审核设置
                    xtype: 'fieldset',
                    height: 60,
                    width: 585,
                    x: 10,
                    y: 680,
                    title: Share.T('红废票审核设置'),
                    layout: {
                        type: 'absolute'
                    },
                    items: [
                        {xtype:'radiogroup',
            				defaultType: 'radio',
            				id:'vat-specialty-abandon-checker',
            				y : ChangeSystem.Explore == 'IE8' ? 6 : -5,
            				columns : 3,
            				
            				items : [ {// 无审查选按钮
                                name : "vat-specialty-abandon-checker-radio",
                                y : 10,
            					inputValue : '0',
            					style : 'margin-bottom:12px',
            					boxLabel : Share.T('无审查'),
            					listeners:{
            						change:function(){
                                	}
                                }
            				},
            				{
            					// 一级审查单选按钮
                                name : "vat-specialty-abandon-checker-radio",
            					inputValue : '1',
            					style : 'margin-bottom:12px',
            					boxLabel : Share.T('一级审查'),
            					listeners:{
            						change:function(){
                                	}
                                }
                            },
                            {
                            	// 二级审查单选按钮
                                name : "vat-specialty-abandon-checker-radio",
            					inputValue : '2',
            					style : 'margin-bottom:12px',
            					boxLabel : Share.T('二级审查'),
            					listeners:{
            						change:function(){
                                	}
                                }
                            }
                          ]},
                    ]
                
                },
                {//第三基本框开始
                	xtype: 'fieldset',
                    x: 10,
                    y: 750,
                    height: 230,
                    id: 'vat-specialty-autoticket-info',
                    width: 585,
                    layout: {
                        type: 'absolute'
                    },
                    title: Share.T('一键开票设置'),
                    items: [{
                    	xtype: 'itemselector',
                    	anchor: '100%',
//                    	margin: '10 30 10',
                    	imagePath: ctx+'/resources/extjs/ux/images/',
                    	fieldLabel: Share.T('一键开票'),
                        x: 0,
                        y: 0,
                        height: 180,
                        id: 'vat-specialty-autoticket-info_detail',
                        name:'vat-specialty_select_ticket_auto',
                        autoScroll:true,
                        width: 550,
                        listeners:{
                            beforequery : function(qe)
                            {
                                this.store.load();
                            }
                        },
                        store: new Ext.data.Store({
								fields: ['ticket_action_name','ticket_action'],
									data: [
									       {ticket_action_name: Share.T('合并相同货物'),ticket_action : 'MG'},
									       {ticket_action_name: Share.T('合并相同客户'),ticket_action : 'MC'},
									       {ticket_action_name: Share.T('拆分超过最大金额'),ticket_action : 'SA'},
									       {ticket_action_name: Share.T('拆分超最大明细行'),ticket_action : 'SD'}
									],
		                	        autoLoad:true ,
		                	        sortInfo: {
		                                field: 'ticket_action_name',
		                                direction: 'ASC'
		                            }
								}),
								valueField : 'ticket_action',
								displayField : 'ticket_action_name',
						        value:[],
						        allowBlank: false,                
	                            msgTarget: 'side',
	                            blankText  : Share.T('此项目不能为空。'),
	                            fromTitle: Share.T('待选择'),
	                            toTitle: Share.T('已选择' )    
                    }]
                }//第三基本框结束
                                ]
                    }
            ],
            listeners: {
                afterlayout: {
                    fn: me.LoadVatInvoiceData,
                    scope: me
                }
            }
        });

        me.callParent(arguments);
    },
    
    LoadVatInvoiceData: function(abstractcontainer, layout, options) {
    	Share.AjaxRequest({
            url      : ctx + '/getInvoiceData',
            showMsg: false,
            params   : {
            	type : "VAT"
            },
            callback : function(json) {
//            	console.log("TICKET: "+json);
            	Ext.getCmp('vat-specialty-base-maxmoney').setValue(json[0].max_money);
            	Ext.getCmp('vat-specialty-base-maxline').setValue(json[0].max_line);
            	Ext.getCmp('vat-specialty-cal-unitprice').setValue(json[0].pricecala_acc);
            	Ext.getCmp('vat-specialty-cal-num').setValue(json[0].numcala_acc);
            	Ext.getCmp('vat-specialty-cal-split').setValue(json[0].splitcala_acc);
            	Ext.getCmp('vat-specialty-step-split').setValue(json[0].splitcala_step);
            	Ext.getCmp('vat-specialty-cal-maxline').setValue(json[0].min_line);
            	Ext.getCmp('vat-specialty-cal-minmoney').setValue(json[0].min_money);
            	Ext.getCmp('vat-specialty-base-interface').setValue(json[0].interface_way);
            	Ext.getCmp('vat-specialty-base-writeback').setValue(json[0].writeback_way);
            	Ext.getCmp('vat-specialty-autoticket-info_detail').setValue(json[0].ticketsmake);
            	//少回写方式
            	var WriteBackERPWayGroup = Ext.getCmp('vat-specialty-base-erp');  //回写ERP方式ITEM遍历
        		var WriteBackERPWay = json[0].writebackerp_way.toString();
        		WriteBackERPWayGroup.items.each(function(item){  //RADIO组遍历
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == WriteBackERPWay){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var WriteBackWayGroup = Ext.getCmp('vat-specialty-base-writeback');  //回写方式ITEM遍历
        		var WriteBackWay = json[0].writeback_way.toString();
        		WriteBackWayGroup.items.each(function(item){  //RADIO组遍历
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == WriteBackWay){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var InterfaceWayGroup = Ext.getCmp('vat-specialty-base-interface');  //接口方式ITEM遍历
        		var InterfaceWay = json[0].interface_way.toString();
        		InterfaceWayGroup.items.each(function(item){  //RADIO组遍历
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == InterfaceWay){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var DataImportWayGroup = Ext.getCmp('vat-specialty-base-dataimport-radio');  //数据导入方式ITEM遍历
        		var DataImportWay = json[0].dataimport_way.toString();
        		DataImportWayGroup.items.each(function(item){  //RADIO组遍历
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == DataImportWay){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var PriceWayGroup = Ext.getCmp('vat-specialty-cal-price');  //价格方式ITEM遍历
        		var PriceWay = json[0].price_way.toString();
        		PriceWayGroup.items.each(function(item){  //RADIO组遍历
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == PriceWay){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var CalImportWayGroup = Ext.getCmp('vat-specialty-cal-import');  //导入计算规则ITEM遍历
        		var CalImportWay = json[0].importcala_ruler.toString();
        		CalImportWayGroup.items.each(function(item){  //RADIO组遍历
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == CalImportWay){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var UserMdataClientGroup = Ext.getCmp('vat-specialty-base-clientmaindata');  //客户主数据关联方式遍历
        		var isUseMdataClient = json[0].isuse_mdataclient;
        		UserMdataClientGroup.items.each(function(item){  
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == isUseMdataClient){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var UserMdataGoodsGroup = Ext.getCmp('vat-specialty-base-goodsmaindata');  //商品主数据关联方式遍历
        		var isUseMdataGoods = json[0].isuse_mdatagoods;
        		UserMdataGoodsGroup.items.each(function(item){
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == isUseMdataGoods){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var ImportOverrideAppendGroup = Ext.getCmp('vat-specialty-base-importoverrideappend');  //导入覆盖方式遍历
        		var ImportOverrideAppend = json[0].importoverrideappend;
        		ImportOverrideAppendGroup.items.each(function(item){
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == ImportOverrideAppend){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var PriceOrCountGroup = Ext.getCmp('vat-specialty-base-splitfunc');  //拆分超额方式遍历
        		var PriceOrCount = json[0].priceorcount;
        		if(!PriceOrCount){
        			PriceOrCount = 0;
        		}
        		PriceOrCountGroup.items.each(function(item){
//        			console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
    				if(item.inputValue == PriceOrCount){  //获取RADIO值
    					item.setValue(true);  //设置RADIO值
    				}
    			});
        		var AbandonCheckGroup = Ext.getCmp('vat-specialty-abandon-checker');  //红废审核级数遍历
        		var AbandonCheck = json[0].abandoncheck;
	        	AbandonCheckGroup.items.each(function(item){
//	        		console.log("radio: "+item.inputValue+",value: "+WriteBackERPWay);
	        		if(item.inputValue == AbandonCheck){  //获取RADIO值
	        			item.setValue(true);  //设置RADIO值
	    			}
	    		});
        		
            	Ext.getCmp('vat-specialty-cal-import').setValue(json[0].importcala_ruler);
            	Ext.getCmp('vat-specialty-cal-price').setValue(json[0].pricecala_acc);
            	Ext.getCmp('vat-specialty-base-erp').setValue(json[0].writebackerp_way);
            	Ext.getCmp('vat-specialty-base-dataimport-radio').setValue(json[0].dataimport_way);
            	Ext.getCmp('vat-specialty-base-is-outcode').setValue(json[0].is_outcode);
            	Ext.getCmp('vat-specialty-base-is-pinaccount').setValue(json[0].isdisplay_pinaccout);
            }
    	});
    }

});